package com.mimi.util;

/**
 * @Author:徐向
 * @Description:
 * @Date: Created in 13:53 2017/10/17
 */
public class MathUtil {

    private  static final Double MONERY_RANGE=0.01;
    /**
     * 比较2个金额是否相等
     * @param d1
     * @param d2
     * @return
     */
    public static Boolean equals(Double d1, Double d2) {
        Double result =Math.abs(d1 - d2);
        if (result < MONERY_RANGE) {
            return true;
        } else {
            return false;
        }
    }
}
